<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>首页</title>
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<meta name="screen-orientation" content="portrait">
		<meta name="x5-orientation" content="portrait">
		<style type="text/css">
			html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video { margin: 0; padding: 0; border: 0; font-size: 100%; font: inherit; vertical-align: baseline; }
			body{
				font-family: "microsoft yahei";
			}
			.video{
				position: absolute;
				top: 0;
				left: 0;
				z-index: 1;
			}
			.index{
				position: relative;
				z-index: 1000;
				color: white;
				background-color: #b00000;
			}
			/*首页的p标签*/
			.index_p1{
				font-size: 20px;
				line-height: 20px;
				position: absolute;
				top: 10%;
				left: 10%;
			}
			.index_p2{
				font-size: 30px;
				line-height: 45px;
				position: absolute;
				top: 23%;
				left: 10%;
				width: 80%;
				text-align: center;
			}
			.index_p3{
				position: absolute;
				top: 63%;
				right: 10%;
				font-size: 20px;
				line-height: 30px;
			}
			.index_p4{
				position: absolute;
				top: 68%;
				right: 10%;
				font-size: 20px;
				line-height: 30px;
			}
			.button{
				display: block;
				width: 60%;
				position: absolute;
				left: 20%;
				bottom: 12%;
			}
			.button img{
				width: 100%;
			}
		</style>
	</head>
	<body>
		<div class="index">
			<p class="index_p1">小野</p>
			<p class="index_p2">
				新春快乐<br />
				祝您2017年<br />
				业绩冲天<br />
				鹏程万里
			</p>
			<p class="index_p3">INSIGHT</p>
			<p class="index_p4">王宁</p>
			<a class="button" href="generate.html">
				<img src="img/index.png"/>
			</a>
		</div>
		
		
		<script src="js/jquery-2.1.0.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			function GetArgsFromHref(sHref, sArgName){
			      var args    = sHref.split("?");
			      var retval = "";
			    
			      if(args[0] == sHref) /*参数为空*/
			      {
			           return retval; /*无需做任何处理*/
			      }  
			      var str = args[1];
			      args = str.split("&");
			      for(var i = 0; i < args.length; i ++)
			      {
			          str = args[i];
			          var arg = str.split("=");
			          if(arg.length <= 1) continue;
			          if(arg[0] == sArgName) retval = arg[1]; 
			      }
			      return retval;
			}
			
			var postid = GetArgsFromHref(window.location.href,'id');	
			console.log(postid)
			var _video1 = $("#video1")[0];
			$(document).ready(function() {
				mainliWidth();
				$(window).resize(function() {
					mainliWidth();
				});
				function mainliWidth() {
					var height = document.documentElement.clientHeight;
					$(".index").css("height", height);
				}
			});
			
			$.ajax({
				type:"post",
				url:"./app/index.php?c=index&a=getBlessing",
				data:{'id':postid},
				success:function(ret){
					var _from = ret.from;
					var _to = ret.to;
					var _content= ret.content;
					
					$(".index_p1").append(_from);
					$(".index_p2").append(_content);
					$(".index_p4").append(_to)
				}
			});
		</script>
	</body>
</html>